Skip to content

Conversation

@bratpiorka
Copy link
Contributor

@bratpiorka bratpiorka commented Jan 5, 2026

Summary

This change updates clang-linker-wrapper to invoke NVIDIA fatbinary using the --image3=... image specification format (kind + SM + file) instead of the legacy --image=profile=... format, which is no longer supported in CUDA Toolkit version 13 and later.
Since newer CUDA toolkits have removed the legacy --image option, clang-linker-wrapper must use --image3 to maintain compatibility.

Changes

  • Refactored NVPTX fatbin construction to generate fatbinary arguments in the following form:
--image3=kind=ptx,sm=<N>,file=<ptx>
--image3=kind=elf,sm=<N>,file=<cubin>
  • Updated the fatbinary helper to consume OffloadingImage objects directly.
  • Adjusted driver tests to accept both legacy and --image3 formats where applicable.

NOTE: upstream already has this changed implemented in: llvm/llvm-project@79d8a26

@bratpiorka bratpiorka changed the title [CUDA] refactor fatbinary to use -image3 [CUDA] refactor fatbinary to use --image3 Jan 5, 2026
@bratpiorka bratpiorka force-pushed the rrudnick_cuda_fatbinary branch from 93f960e to 4ad6a4d Compare January 5, 2026 13:54
@bratpiorka bratpiorka force-pushed the rrudnick_cuda_fatbinary branch from 4ad6a4d to 118d33c Compare January 5, 2026 14:01
@bratpiorka bratpiorka marked this pull request as ready for review January 7, 2026 07:54
@bratpiorka bratpiorka requested review from a team as code owners January 7, 2026 07:54
@bratpiorka
Copy link
Contributor Author

@dpcpp-tools-reviewers @intel/dpcpp-clang-driver-reviewers the failures on Intel Arc in CI are unrelated, as the changes affect only CUDA code

@bratpiorka bratpiorka marked this pull request as draft January 7, 2026 08:19
@bratpiorka bratpiorka force-pushed the rrudnick_cuda_fatbinary branch from 118d33c to 635b61a Compare January 12, 2026 13:08
@bratpiorka bratpiorka force-pushed the rrudnick_cuda_fatbinary branch from 635b61a to 78a5b0f Compare January 13, 2026 09:06
@bratpiorka bratpiorka force-pushed the rrudnick_cuda_fatbinary branch from 78a5b0f to 2fcb8dd Compare January 13, 2026 11:38
@bratpiorka bratpiorka force-pushed the rrudnick_cuda_fatbinary branch from 2fcb8dd to 230c083 Compare January 13, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant